def nsieve(m, isPrime):
   for i in range(2, m, 1):
      isPrime[i] = True
   count = 0
   for i in range(2, m, 1):
      if isPrime[i]:
         for k in range(i+i, m, i):
            isPrime[k] = False
         count = count + 1
   return count


print(nsieve(5120000, {}))

